package com.cirkana;

import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class ViewerPreferences {

	private static final String PREF_SELECTROUTE_SOURCE = "selectRouteSource";
	
	private static final int DEFAULT_SELECTROUTE_SOURCE = 0;
	
	protected SharedPreferences preferences;
	
	public ViewerPreferences(SharedPreferences preferences) {
		this.preferences = preferences;
	}
	
	public int getSelectRouteSource() {
		return this.preferences.getInt(PREF_SELECTROUTE_SOURCE, DEFAULT_SELECTROUTE_SOURCE);
	}
	
	public void setSelectRouteSource(int source) {
		Editor ed = this.preferences.edit();
		ed.putInt(PREF_SELECTROUTE_SOURCE, source);
		ed.commit();
	}
}
